<extend name="zh_tw:Public:base" />
<block name="title">
    <title>經銷商主页- 賬號管理</title>
</block>
<block name="extendHead">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/common_control.css?rev=65393a524028c7e3b76e961a08059c71">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/AccountPage/index.css?rev=ada2ee790e841815f08621ce2b214f14">
    <link rel="stylesheet" type="text/css" href="/Public/jslib/cropper/2.3.0/cropper.min.css?rev=4cd5b78b4c0581196ff92a4a5b9c140d">
</block>
<block name="document">
    <div id="doc" class="container-above-md">
       <include file="zh_tw:Public:Include_dealer_control_navbar" navbar-menu-setting="active" />
        <div id="doc-body" class="row">
            <include file="zh_tw:Public:Include_dealer_setting_side" doc-side-account="active" />
            <div id="doc-center">
                <div class="content-panel">
                    <div class="content-panel-header">
                        <div class="content-panel-title">我的信息</div>
                        <div class="content-panel-operation">
                            <div class="btn-raised btn-sm btn-primary" data-name="{$userName}" data-id="{$userId}" data-toggle="modal" data-target="#infoModal">編輯信息</div>
                        </div>
                    </div>
                    <div class="content-panel-body">
                        <div class="row vertical-margin">
                            <div class="col-xs-2 text-right typo-body-2">賬號/手機號：</div>
                            <div class="col-xs-9 typo-body-1">+{$areaCode} {$userMobile}</div>
                        </div>
                        <div class="row vertical-margin">
                            <div class="col-xs-2 text-right typo-body-2">角色：</div>
                            <div class="col-xs-9 typo-body-1">經銷商</div>
                        </div>
                        <div class="row vertical-margin">
                            <div class="col-xs-2 text-right typo-body-2">姓名：</div>
                            <div class="col-xs-9 typo-body-1">{$userName}</div>
                        </div>
                        <div class="row vertical-margin">
                            <div class="col-xs-2 text-right typo-body-2">頭像：</div>
                            <div class="col-xs-9">
                                <img class="lazyload img-avatar" data-original="{$userHead}" />
                            </div>
                        </div>
                    </div>
                    <div class="content-panel-footer">
                        <div class="pull-left">
                            <div class="btn-sm btn-link" data-toggle="modal" data-mobile="{$adminLogin.mobile}" data-target="#changeMobileModal">更換手機號</div>
                            <div class="btn-sm btn-link text-accent" data-toggle="modal" data-target="#changePasswordModal">修改密碼</div>
                        </div>
                    </div>
                </div>
 
            </div>
        </div>
    </div>
    <!--end of doc-->
    
    <include file="zh_tw:Public:Include_picture_cropper" />
    
    <!--編輯信息模态框-->
    <div class="modal fade" data-backdrop="static" id="infoModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">編輯信息</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">姓名:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="editName" maxlength="20" autocomplete="off" placeholder="請輸入姓名" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">更換頭像：</label>
                            <div class="fileUpload" id="showOrganizationNoContainer">
                                <div class="col-xs-3 input-btn-group">
                                    <input type="text" class="form-control input-btn-group-input" id="uploadPicture" readonly placeholder="請點擊選擇頭像進行上傳" value="{$adminLogin['headpath']}">
                                    <input type="file" accept="image/*" class="hidden fileUploadInput">
                                </div>
                                <div class="col-xs-2 input-group-right">
                                    <div id="organizationUpload" data-config="user" class="col-xs-12 btn-accent btn-raised input-btn-group-btn fileUploadTrigger">上傳</div>
                                </div>
                                <div class="col-xs-4">
                                    <div class="help-block"></div>
                                </div>
                                <a class="hidden fileUploadStart btn-primary btn-raised">上傳</a>
                                <div class="col-xs-12 vertical-padding">
                                    <div class="col-xs-offset-3">
                                        <div class="fileUploadProgress spinner spinner-single-color ulite-js-spinner is-active"></div>
                                        <img class="img-certification fileUploadResult img-avatar" src="{$userHead}" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" data-value="" id="submitInfo">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--更換手機號模态框-->
    <div class="modal fade" data-backdrop="static" id="changeMobileModal">
        <div class="modal-dialog sm-width" id="changeMobileModalDialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">更換手機號</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm" id="verifyMobileForm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">手機號:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="verifyMobile" readonly="readonly" value="+{$areaCode} {$userMobile}" placeholder="+{$areaCode} {$userMobile}">
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">效驗碼:</label>
                            <div class="col-xs-3 input-btn-group">
                                <input type="text" class="form-control" name="code" id="verifyMobileCode" maxlength='6' placeHolder="請輸入短信校驗碼" autocomplete="off" value="">
                            </div>
                            <div class="col-xs-2 input-group-right">
                                <div id="verifyVcodeTrigger" data-areaCode='{$areaCode}' class="col-xs-12 btn-accent btn-raised input-btn-group-btn"><span class="displayTime"></span>獲取驗證碼</div>
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </form>
                    <form class="form-horizontal form-sm hidden" id="changeMobileForm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">新手機號:</label>
                            <div class="col-xs-5">
                                <include file="zh_tw:Public:Include_area_code" style=''  />
                                <input type="text" class="form-control" style="padding-left: 58px;" id="newMobile" maxlength="11" autocomplete="off" placeHolder="請輸入新的手機號碼" value="">
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">效驗碼:</label>
                            <div class="col-xs-3 input-btn-group">
                                <input type="text" class="form-control" name="code" id="newMobileCode" maxlength='6' placeHolder="請輸入短信校驗碼">
                            </div>
                            <div class="col-xs-2 input-group-right">
                                <div id="newVcodeTrigger" class="btn-accent btn-raised input-btn-group-btn col-xs-12"><span class="displayTime"></span>獲取驗證碼</div>
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitVerifyMobile">下壹步，設置新手機號</button>
                                <button type="button" class="btn-sm btn-primary btn-raised hidden" id="submitChangeMobile">完成</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--修改密碼模态框-->
    <div class="modal fade" data-backdrop="static" id="changePasswordModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">修改密碼</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">舊密碼:</label>
                            <div class="col-xs-5">
                                <input type="password" autocomplete="off" class="form-control" id="requestPassword" placeholder="請輸入舊密碼" value="">
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">新密碼:</label>
                            <div class="col-xs-5">
                                <input type="password" autocomplete="off" class="form-control" id="requestNewPassword" placeholder="請輸入新密碼" value="">
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">確認新密碼:</label>
                            <div class="col-xs-5">
                                <input type="password" autocomplete="off" class="form-control" id="requestConfirmNew" placeholder="請輸入新密碼" value="">
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">驗證碼:</label>
                            <div class="col-xs-3 input-btn-group">
                                <input type="text" autocomplete="off" maxlength="4" class="form-control" id="requestVcode" placeholder="請輸入圖片驗證碼" value="">
                            </div>
                            <div class="col-xs-2 input-group-right">
                                <img id="imgcode" class="input-btn-group-btn col-xs-12 col-without-padding" onclick="javascript:refreshVcode();" src="{:U('Home/Public/createpic');}">
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitChangePassword">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>    

</block>
<block name="extendFootJs">
    <script type="text/javascript" src="/Public/dist/Home/common_control.js?rev=0b5b06286994091069ff913675676b02"></script>
    <script type="text/javascript" src="/Public/jslib/cropper/2.3.0/cropper.min.js?rev=622bdc81acfb828b06e23a5ab59c315f"></script>
    <script type="text/javascript" src="/Public/jslib/canvas-to-blob/3.3.0/canvas-to-blob.min.js?rev=a0ad0191898c078a477dffe0aa7730e1"></script>
    <script type="text/javascript" src="/Public/dist/Home/BookSettingPage/cropper.js?rev=ac48069fd13c0949990004b8c59ef79f"></script>
    <script type="text/javascript" src="/Public/jslib/qrcode/jquery-qrcode.min.js"></script>
    <script type="text/javascript" src="/Public/dist/Home/DealerPage/indexdealer.js?rev=5fc9f5e6e800900b074c11f8b24156b1"></script>
</block>

